import time
from selenium import webdriver
from selenium.webdriver.common.by import By

# 打开浏览器, 请求目标网址
driver = webdriver.Chrome()
driver.get('https://mail.163.com')

# 添加需要登录的cookie
cookies = [
    {
        'name': 'MAIL_SESS',
        'value': 'I2haMfX3RjSu6NsFLPOfTQ9P8zxOz06tzNkNScRZCQniO1zGOBYERDpLaLlHaQbO9kgzoom32UsKZh0Q_u1znuKjJHysv.mrK0RJoMITxWktt0lv71FFh8he4SIseu.fyq9fNJd_OowXvgon6N6MqslxrczPRpa5_UOobU3BPUQrp_f6lcSd7m0OEnfp8vMe9eG99G38bCfvD'
    },

    {
        'name': 'NTES_SESS',
        'value': 'I2haMfX3RjSu6NsFLPOfTQ9P8zxOz06tzNkNScRZCQniO1zGOBYERDpLaLlHaQbO9kgzoom32UsKZh0Q_u1znuKjJHysv.mrK0RJoMITxWktt0lv71FFh8he4SIseu.fyq9fNJd_OowXvgon6N6MqslxrczPRpa5_UOobU3BPUQrp_f6lcSd7m0OEnfp8vMe9eG99G38bCfvD'

    }
]

# 添加cookie
driver.add_cookie(cookies[0])
driver.add_cookie(cookies[1])

# 刷新浏览器
driver.refresh()

# 退出浏览器
time.sleep(5)
driver.quit()